<?php
namespace backend\models\course;
use yii\db\ActiveRecord;
use backend\models\course\Course;
use yii\data\Pagination;

/*
	问题表的查询
*/
class Question extends ActiveRecord{
	public function Classs(){
		$user = $this->find()->where("ques_type=0")->asArray()->all();
		return $user;
	}
	public function CourseClass(){
		$course = Course::find()->asArray()->all();
		return $course;
	}
	public function Classdel($id){
		$res = Question::deleteAll("ques_id in($id)");
		return $res;
	}
	public function ClassKing(){
		$user = $this->find()->where("ques_type=1")->asArray()->all();
		return $user;
	}
}